﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace IceDog.DNF.Program.Ef6.Models
{
    /// <summary>
    /// 订单
    /// </summary>
    public class Order
    {
        /// <summary>
        /// 订单id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 客人名称
        /// </summary>
        //[ConcurrencyCheck]
        public string Customer { get; set; }
        /// <summary>
        /// 下单日期
        /// </summary>
        public System.DateTime OrderDate { get; set; }
        /// <summary>
        /// 订单详情列表
        /// </summary>
        public virtual List<OrderDetail> OrderDetails { get; set; }
        /// <summary>
        /// 行版本，用于标识设置并发控制字段
        /// </summary>
        [Timestamp]
        public byte[] RowVersion { get; set; }
    }
}
